package com.cmfi.service.impl;

import java.util.HashMap;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cmfi.dao.SpeedRecDao;
import com.cmfi.service.inter.SpeedRecService;

@Service
public class SpeedRecServiceImpl implements SpeedRecService {
	 @Autowired
	    private SpeedRecDao speedRecDao;
	    
	    Logger log = LoggerFactory.getLogger(getClass());
	    
	    @Override
		public List<HashMap<Object,String>> get7DaysUsed() throws Exception {
	    	log.debug("Request to get SpeedRecs of 7 days.");
			List<HashMap<Object,String>> speedRec7List = speedRecDao.get7DaysUsed();
			return speedRec7List;
		}
	    
	    @Override
		public List<HashMap<Object,String>> get12MonthsUsed() throws Exception {
	   	    log.debug("Request to get SpeedRecs of 12 months.");
	   	 List<HashMap<Object,String>> speedRec12List = speedRecDao.get12MonthsUsed();
			return speedRec12List;
	    }	
}
